//
//  ViewController.m
//  train reminder
//
//  Created by Nils Rotgans on 19-02-12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ViewController.h"

@implementation ViewController

@synthesize knop;

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    
	// Do any additional setup after loading the view, typically from a nib.
    //knop openen
//    knop = [[UIButton alloc] initWithFrame:CGRectMake(30, 30, 150, 150)];
//    [knop setBackgroundColor:[UIColor blueColor]];
//    [knop setTitle:@"hallo" forState:UIControlStateNormal];
//    [knop addTarget:self action:@selector(knopIngedrukt) forControlEvents:UIControlEventTouchUpInside];
//    [self.view addSubview:knop];
    //knop klaar
    
    UISwitch *toggle = [[UISwitch alloc] initWithFrame:CGRectMake(210, 30, 150, 150)];

    [self.view addSubview:toggle];
    
    
    
}

-(void)knopIngedrukt{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"bericht" message:@"hallo word"  delegate:self cancelButtonTitle:@"oke" otherButtonTitles: @"stop", nil];
    [alert show];
    [alert release];
    
}


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
	[super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated
{
	[super viewDidDisappear:animated];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

@end
